home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / AIncludes / StandardFile.a < prev    next >
Encoding:
Text File  |  1992-01-29  |  4.7 KB  |  184 lines  |  [TEXT/MPS ]

  1. ; Version: 1.4
  2. ; Created: Friday, January 20, 1990 at 9:11:52 PM
  3. ; File: StandardFile.a
  4. ;
  5. ; Assembler Interface to the Macintosh Libraries
  6. ; Copyright Apple Computer, Inc. 1989-1991
  7. ; All Rights Reserved
  8. ;
  9. ;--------------------------------------------------------------------
  10.  
  11.     IF &TYPE('__IncludingStandardFile__') = 'UNDEFINED' THEN
  12. __IncludingStandardFile__    SET    1
  13.  
  14.     IF &TYPE('__IncludingTraps__') = 'UNDEFINED' THEN       ; get defintion of _Pack3
  15.     INCLUDE 'Traps.a'
  16.     ENDIF
  17.  
  18. StandardFileReply    RECORD    0
  19. sfGood                    DS.B    1                    ; ST if OK hit
  20. sfReplacing                DS.B     1                      ; ST if user requested "replace existing"
  21. sfType                     DS.L    1                     ; type of file
  22. sfFile                    DS.B    70                    ; FSSpec (vRefNum, parID, name)
  23. sfScript                DS.W    1                    ; ScriptCode of filename
  24. sfFlags                    DS.W    1                    ; Finder flags
  25. sfIsFolder                 DS.B    1                    ; ST if item is a folder
  26. sfIsVolume                 DS.B    1                    ; ST if item is a volume
  27. sfReserved1                 DS.L    1                    ; reserved set to 0
  28. sfReserved2                 DS.W    1                    ; reserved set to 0 
  29.                     ENDR
  30.  
  31.  
  32. SFReply        RECORD    0
  33. good            DS.B    1    ; ST if OK hit
  34. copy            DS.B    1    ; ST replacing ???
  35. fType             DS.L    1     ; type of file or DirID
  36. vRefNum            DS.W    1    ; vRefNum or WDRefNum
  37. version            DS.W    1    ; unused
  38. fName            DS.B    64    ; name of file
  39.             ENDR
  40.  
  41. ; pseudo-item hits for use in DlgHook
  42. sfHookFirstCall        EQU         -1
  43. sfHookCharOffset    EQU         $1000
  44. sfHookNullEvent        EQU         100
  45. sfHookRebuildList    EQU         101
  46. sfHookFolderPopUp    EQU         102
  47. sfHookOpenFolder    EQU         103
  48. ; the following are only in system 7.0+ 
  49. sfHookOpenAlias            EQU     104
  50. sfHookGoToDesktop        EQU     105
  51. sfHookGoToAliasTarget    EQU     106
  52. sfHookGoToParent        EQU        107
  53. sfHookGoToNextDrive        EQU        108
  54. sfHookGoToPrevDrive        EQU        109
  55. sfHookChangeSelection    EQU        110
  56. sfHookSetActiveOffset    EQU     200
  57. sfHookLastCall            EQU     -2
  58.  
  59.  
  60. ; resource IDs and item offsets of pre-system 7.0 dialogs 
  61. putDlgID          EQU         -3999                     ; SFPutFile dialog template ID
  62. putSave           EQU         1                         ; save button
  63. putCancel         EQU         2                         ; cancel button
  64. putPrompt        EQU            3                        ; prompt, i.e. Save document as:
  65. putVolume        EQU            4                        ; volume icon and name
  66. putEject          EQU         5                         ; eject button
  67. putDrive          EQU         6                         ; drive button
  68. putName           EQU         7                         ; editTExt item for file name
  69. putNmList         EQU         8                         ; userItem for file name list
  70.  
  71.  
  72. getDlgID          EQU         -4000                     ; SFGetFile dialog template ID
  73. getOpen           EQU         1                         ; open button
  74. getCancel         EQU         3                         ; cancel button
  75. getEject          EQU         5                         ; eject button
  76. getDrive          EQU         6                         ; drive button
  77. getNmList         EQU         7                         ; userItem for file name list
  78. getScroll         EQU         8                         ; userItem for scroll bar
  79. getGrayBar        EQU            9                        ; grey line between buttons
  80.  
  81.  
  82. ; resource IDs and item offsets of system 7.0+ dialogs 
  83. sfPutDialogID            EQU -6043
  84. sfGetDialogID            EQU -6042
  85. sfItemOpenButton        EQU    1
  86. sfItemCancelButton        EQU    2
  87. sfItemBalloonHelp        EQU 3
  88. sfItemVolumeUser        EQU 4
  89. sfItemEjectButton        EQU 5
  90. sfItemDesktopButton        EQU 6
  91. sfItemFileListUser        EQU 7
  92. sfItemPopUpMenuUser        EQU 8
  93. sfItemDividerLinePict    EQU    9
  94. sfItemFileNameTextEdit    EQU    10
  95. sfItemPromptStaticText    EQU 11
  96. sfItemNewFolderUser        EQU 12
  97.  
  98.  
  99. ; the refcon field of the dialog record during a modalfilter or dialoghook contains one the following
  100. sfMainDialogRefCon        EQU        'stdf'
  101. sfNewFolderDialogRefCon    EQU        'nfdr'
  102. sfReplaceDialogRefCon    EQU        'rplc'
  103. sfStatWarnDialogRefCon    EQU        'stat'
  104. sfLockWarnDialogRefCon    EQU        'lock'
  105. sfErrorDialogRefCon        EQU        'err '
  106.  
  107.  
  108. ; Routine selectors
  109. selectorSFPutFile         EQU         1
  110. selectorSFGetFile         EQU         2
  111. selectorSFPPutFile        EQU         3
  112. selectorSFPGetFile        EQU         4
  113. selectorStandardPutFile    EQU            5
  114. selectorStandardGetFile    EQU            6
  115. selectorCustomPutFile    EQU            7
  116. selectorCustomGetFile    EQU            8
  117.  
  118.  
  119.  
  120.                   MACRO
  121.                   _SFPutFile
  122.                   MOVE.W     #selectorSFPutFile,-(SP)
  123.                 _Pack3
  124.                   ENDM
  125.  
  126.                   MACRO
  127.                   _SFGetFile
  128.                   MOVE.W     #selectorSFGetFile,-(SP)
  129.                 _Pack3
  130.                   ENDM
  131.  
  132.                   MACRO
  133.                   _SFPPutFile
  134.                   MOVE.W     #selectorSFPPutFile,-(SP)
  135.                 _Pack3
  136.                   ENDM
  137.  
  138.                   MACRO
  139.                   _SFPGetFile
  140.                   MOVE.W     #selectorSFPGetFile,-(SP)
  141.                 _Pack3
  142.                   ENDM
  143.                 
  144.                  MACRO
  145.                   _StandardPutFile
  146.                   MOVE.W     #selectorStandardPutFile,-(SP)
  147.                 _Pack3
  148.                   ENDM
  149.  
  150.                   MACRO
  151.                   _StandardGetFile
  152.                   MOVE.W     #selectorStandardGetFile,-(SP)
  153.                 _Pack3
  154.                   ENDM
  155.  
  156.                    MACRO
  157.                   _CustomPutFile
  158.                   MOVE.W     #selectorCustomPutFile,-(SP)
  159.                 _Pack3
  160.                   ENDM
  161.  
  162.                  MACRO
  163.                   _CustomGetFile
  164.                   MOVE.W     #selectorCustomGetFile,-(SP)
  165.                 _Pack3
  166.                   ENDM
  167.  
  168.  
  169. ; old style equates for compatability
  170.  
  171. ; Reply record data structure
  172. rGood             EQU         0                         ; ignore command if FALSE
  173. rType             EQU         2                         ; file type
  174. rVolume           EQU         6                         ; volume reference number
  175. rVersion          EQU         8                         ; file's version number
  176. rName             EQU         10                        ; file name
  177.  
  178. ; Routine selectors
  179. sfPutFile         EQU         1
  180. sfPPutFile        EQU         3
  181. sfGetFile         EQU         2
  182. sfPGetFile        EQU         4
  183.  
  184.     ENDIF    ; ...already included